package com.mww.chatroom.mapper;

import com.mww.chatroom.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    //把用户信息插入数据库
 //   @Insert("insert into user(username,password) values(#{username},#{password})")
   // int insert(@Param("user") User user);
    int insert(@Param("user") User user);


    //根据用户名查询用户信息
    User selectByUsername(@Param("username") String username);
}
